﻿
using System;

using Xc.DataAccess.CodeReader.Models;

namespace Xc.DataAccess.CodeReader
{
    /// <summary>
    /// 输入参数信息
    /// </summary>
    public class InputParameterInfo
    {
        /// <summary>
        /// 参数名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 属性名称
        /// </summary>
        public string PropertyName { get; set; }
        /// <summary>
        /// 类型名称
        /// </summary>
        public string TypeName { get; set; }
        /// <summary>
        /// 类型
        /// </summary>
        public Type Type { get; set; }
        /// <summary>
        /// 默认值
        /// </summary>
        internal Func<object> DefaultValueEvent { get; set; }
        /// <summary>
        /// 默认值
        /// </summary>
        public object DefaultValue => DefaultValueEvent?.Invoke();
        /// <summary>
        /// 是否必选参数
        /// </summary>
        public ParameterType IsMust { get; set; }
    }
}
